<?php
if(!isset($title))
if (class_exists('Zend_Registry', false) && Zend_Registry::isRegistered('Zend_Translate'))
    $title = ___('An Error has occured');
else
    $title = 'An Error has occured';
foreach ($this->headScript()->getKeys() as $k)
    $this->headScript()->offsetUnset($k);

if(empty($_SERVER['HTTP_X_REQUESTED_WITH']) || strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) != 'xmlhttprequest') 
    $this->setLayout("layout.phtml");

?>

<table><tr><td><ul>
<?php if (is_array($error)): ?>
<?php foreach ($error as $e): ?>
<li><span style="color: red; font-weight: bold;"><?php if ($is_html): ?><?php echo $e ?><?php else: ?><?php p($e) ?><?php endif ?></span></li>
<?php endforeach ?>
<?php else: ?>
<span style="color: red; font-weight: bold;"><?php if ($is_html): ?><?php echo $error ?><?php else: ?><?php p($error) ?><?php endif ?></span>
<?php endif ?>

<?php if (!empty($trace) && is_string($trace)): ?>
<pre><?php echo nl2br($trace)?></pre>
<?php elseif (!empty($trace) && is_array($trace)): ?>
<pre>
<table class="trace" border="0">
<tr>
    <th>File</th>
    <th>Line</th>
    <th>Method</th>
    <th>Class</th>
    <th>&nbsp;</th>
    <th>Params</th>
</tr>
<?php foreach ($trace as $r): ?>
<tr>
<?php foreach ($r as $s): ?>
<td><?php if (!is_array($s)): ?><?php echo $s ?><?php else: ?>{$s|var_dump}<?php endif ?></td>
<?php endforeach ?>
</tr>
<?php endforeach ?>
</table><?php endif ?>
<ul></td></tr></table>

<br /><br />
Please contact webmaster: <a href="mailto:<?php p($di->config->get('admin_email')) ?>"><?php p($di->config->get('admin_email')) ?></a>.


